Commit ab8b4e78 authored by Jan Möbius's avatar Jan Möbius

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 08246e00
......@@ -583,7 +583,11 @@ void Core::loadPlugin(QString filename, bool silent){
scrollArea->setWidgetResizable(true);
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_;
toolboxindex_++;
......
......@@ -130,9 +130,9 @@ void CoreWidget::setViewMode( QString _mode ){
// //find viewMode
// for (int i=0; i < viewModes_.size(); i++)
// if ( viewModes_[i]->name == _mode ){
//
//
// OpenFlipper::Options::defaultToolboxMode(_mode);
//
//
// QStringList widgets = viewModes_[i]->visibleWidgets;
// //and find all widgets that should be visible
// for (uint p=0; p < plugins_.size(); p++){
......@@ -144,11 +144,11 @@ void CoreWidget::setViewMode( QString _mode ){
// else
// plugins_[p].widget->setVisible( false );
// }
//
//
// //tab all dockWidgets together
// tabDockWidgets();
// break;
//
//
// }
slotChangeView(_mode, QStringList());
}
......@@ -156,10 +156,10 @@ void CoreWidget::setViewMode( QString _mode ){
/// Tab all DockWidgets which belong to ToolWidgets together
void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){
int maxH = maximumHeight();
int minH = minimumHeight();
setFixedHeight(height());
// int maxH = maximumHeight();
// int minH = minimumHeight();
//
// setFixedHeight(height());
//if no widgets are given take all visible one's and ignore the order
if (_widgets.size() == 0)
......@@ -182,9 +182,9 @@ void CoreWidget::tabDockWidgets(QVector< QDockWidget* > _widgets){
tabifyDockWidget(d1, d2);
}
}
/*
setMaximumHeight(maxH);
setMinimumHeight(minH);
setMinimumHeight(minH);*/
}
/// show dialog for changing ViewMode
......@@ -203,10 +203,10 @@ void CoreWidget::slotViewModeDialog(){
/// Slot for Changing visible toolWidgets
void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
int maxH = maximumHeight();
int minH = minimumHeight();
// int maxH = maximumHeight();
// int minH = minimumHeight();
setFixedHeight(height());
// setFixedHeight(height());
//try to find Widgets if they aren't given
if (_mode != "" && _toolWidgets.size() == 0)
......@@ -229,6 +229,10 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
QString name_nospace = plugins_[p].name;
name_nospace.remove(" ");
if (_toolWidgets[i] == name_nospace ){
// plugins_[p].widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
// plugins_[p].widget->setMaximumWidth(900);
plugins_[p].widget->setVisible( true );
if ( !plugins_[p].widget->isFloating() )
dockWidgets.push_back( plugins_[p].widget );
......@@ -241,8 +245,8 @@ void CoreWidget::slotChangeView(QString _mode, QStringList _toolWidgets){
//tab all dockWidgets together
tabDockWidgets(dockWidgets);
setMaximumHeight(maxH);
setMinimumHeight(minH);
// setMaximumHeight(maxH);
// setMinimumHeight(minH);
}
/// Slot is called when the visibility of a toolWidget changes
......
Markdown is supported
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