Skip to content

Commit

Permalink
when wanting to add a new collection in the visu dock widget, the use…
Browse files Browse the repository at this point in the history
…r needs to click on 'add a new collection', not on 'More...' anymore

git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@2014 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
lsouhait committed Jan 25, 2010
1 parent 8f0232b commit 3576e84
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion trunk/GoFigure2Beta/Code/GUI/lib/QGoPrintDatabase.h
Expand Up @@ -177,7 +177,7 @@ public slots:
std::pair<std::string,QColor> m_CurrentColorData;
std::pair<std::string,QColor> m_CurrentCollectionData;

/** \todo put it in the GoDBCollectionOfTraces directly?*/
/** \todo put them in a structure with the trace name*/
GoDBCollectionOfTraces* m_CurrentlyUsedCollectionOfTraces;
QTableWidgetChild* m_CurrentlyUsedTable;
std::string m_CurrentlyUsedTraceName;
Expand Down
Expand Up @@ -201,7 +201,8 @@ void QGoVisualizationDockWidget::SetCollectionID(
this->ColorIDCollectionComboBox->addColor(color,name);
iter++;
}
this->ColorIDCollectionComboBox->setColorDialogEnabled(true);
QString Text(tr("Add a new %1...").arg(CollectionName->text()));
this->ColorIDCollectionComboBox->setColorDialogEnabled(true,Text.toStdString());
this->ColorIDCollectionComboBox->show();
}
//-------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions trunk/GoFigure2Beta/Code/GUI/lib/qtcolorcombobox.cxx
Expand Up @@ -124,14 +124,14 @@ QtColorComboBox::QtColorComboBox(QWidget *parent, const char * /*name*/)
\sa insertColor()
*/
void QtColorComboBox::setColorDialogEnabled(bool enabled)
void QtColorComboBox::setColorDialogEnabled(bool enabled,std::string TextToAdd)
{
if (colorDialogEnabled == enabled)
return;

if ((colorDialogEnabled = enabled) == true) {
// Add the color dialog item if it's disabled from before.
addItem(tr("More..."));
addItem(tr(TextToAdd.c_str()));
} else {
// Remove the color dialog item if it's enabled from before.
// It's always the last item in the list.
Expand Down
2 changes: 1 addition & 1 deletion trunk/GoFigure2Beta/Code/GUI/lib/qtcolorcombobox.h
Expand Up @@ -81,7 +81,7 @@ class QT_QTCOLORCOMBOBOX_EXPORT QtColorComboBox : public QComboBox

QColor color(int index) const;

void setColorDialogEnabled(bool enabled = true);
void setColorDialogEnabled(bool enabled = true,std::string TextToAdd = "More...");
bool isColorDialogEnabled() const;

void setCreationCollection(bool enabled = true);
Expand Down
3 changes: 2 additions & 1 deletion trunk/GoFigure2Beta/Code/GUI/src/QGoMainWindow.cxx
Expand Up @@ -241,7 +241,8 @@ void QGoMainWindow::on_actionUse_DataBase_triggered()

//--------------------------------------------------------------------------
void QGoMainWindow::openFilesfromDB()
{
{
int taille = m_DBWizard->GetMultiIndexFileContainer().size();//for test
if( m_DBWizard->GetMultiIndexFileContainer().size() != 0 )
{
GoFigureFileInfoHelperMultiIndexContainer::iterator
Expand Down

0 comments on commit 3576e84

Please sign in to comment.