Commit 764110c6 authored by Jan Möbius's avatar Jan Möbius
Browse files

Dont fix heights of mainwindow when changing viewModes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4931 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7ac7206d
...@@ -583,7 +583,11 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -583,7 +583,11 @@ void Core::loadPlugin(QString filename, bool silent){
scrollArea->setWidgetResizable(true); scrollArea->setWidgetResizable(true);
dock->setWidget(scrollArea); dock->setWidget(scrollArea);
// dock->setMaximumWidth(400); dock->setMaximumWidth(400);
// std::cerr << info.name.toStdString() << std::endl;
// std::cerr << "minimumSizeHint : " << widget->minimumSizeHint().width() << std::endl;
// std::cerr << "minimumSize : " << widget->minimumSize().width() << std::endl;
int newNumber = toolboxindex_; int newNumber = toolboxindex_;
toolboxindex_++; toolboxindex_++;
......
...@@ -156,10 +156,10 @@ void CoreWidget::setViewMode( QString _mode ){ ...@@ -156,10 +156,10 @@ void CoreWidget::setViewMode( QString _mode ){
/// Tab all DockWidgets which belong to ToolWidgets together /// Tab all DockWidgets which belong to ToolWidgets together
void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){ void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){
int maxH = maximumHeight(); // int maxH = maximumHeight();
int minH = minimumHeight(); // int minH = minimumHeight();
//
setFixedHeight(height()); // setFixedHeight(height());
//if no widgets are given take all visible one's and ignore the order //if no widgets are given take all visible one's and ignore the order
if (_widgets.size() == 0) if (_widgets.size() == 0)
...@@ -182,9 +182,9 @@ void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){ ...@@ -182,9 +182,9 @@ void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){
tabifyDockWidget(d1, d2); tabifyDockWidget(d1, d2);
} }
} }
/*
setMaximumHeight(maxH); setMaximumHeight(maxH);
setMinimumHeight(minH); setMinimumHeight(minH);*/
} }
/// show dialog for changing ViewMode /// show dialog for changing ViewMode
...@@ -203,10 +203,10 @@ void CoreWidget::slotViewModeDialog(){ ...@@ -203,10 +203,10 @@ void CoreWidget::slotViewModeDialog(){
/// Slot for Changing visible toolWidgets /// Slot for Changing visible toolWidgets
void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
int maxH = maximumHeight(); // int maxH = maximumHeight();
int minH = minimumHeight(); // int minH = minimumHeight();
setFixedHeight(height()); // setFixedHeight(height());
//try to find Widgets if they aren't given //try to find Widgets if they aren't given
if (_mode != "" && _toolWidgets.size() == 0) if (_mode != "" && _toolWidgets.size() == 0)
...@@ -229,6 +229,10 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){ ...@@ -229,6 +229,10 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
QString name_nospace = plugins_[p].name; QString name_nospace = plugins_[p].name;
name_nospace.remove(" "); name_nospace.remove(" ");
if (_toolWidgets[i] == name_nospace ){ if (_toolWidgets[i] == name_nospace ){
// plugins_[p].widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
// plugins_[p].widget->setMaximumWidth(900);
plugins_[p].widget->setVisible( true ); plugins_[p].widget->setVisible( true );
if ( !plugins_[p].widget->isFloating() ) if ( !plugins_[p].widget->isFloating() )
dockWidgets.push_back( plugins_[p].widget ); dockWidgets.push_back( plugins_[p].widget );
...@@ -241,8 +245,8 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){ ...@@ -241,8 +245,8 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
//tab all dockWidgets together //tab all dockWidgets together
tabDockWidgets(dockWidgets); tabDockWidgets(dockWidgets);
setMaximumHeight(maxH); // setMaximumHeight(maxH);
setMinimumHeight(minH); // setMinimumHeight(minH);
} }
/// Slot is called when the visibility of a toolWidget changes /// Slot is called when the visibility of a toolWidget changes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment