# HG changeset patch # User insilmaril # Date 1141822748 0 # Node ID 22a885118d5070a7f6070fd1b221311e7492b3ab # Parent 402f4cde3ea64d68f879c5d189ff015356e0efe1 Fixed Image Preview in FileDialog diff -r 402f4cde3ea6 -r 22a885118d50 demos/todo.vym Binary file demos/todo.vym has changed diff -r 402f4cde3ea6 -r 22a885118d50 flagrowobj.cpp --- a/flagrowobj.cpp Wed Mar 08 12:59:07 2006 +0000 +++ b/flagrowobj.cpp Wed Mar 08 12:59:08 2006 +0000 @@ -125,14 +125,9 @@ bool FlagRowObj::isActive (const QString &foname) { FlagObj *fo=findFlag (foname); - if (parentRow) - { - if (fo) - return fo->isActive(); - else - qWarning ("FlagRowObj::isActive of "+name+" couldn't find "+foname); - - } else + if (parentRow && fo) + return fo->isActive(); + else if (fo) return true; return false; } diff -r 402f4cde3ea6 -r 22a885118d50 floatobj.cpp --- a/floatobj.cpp Wed Mar 08 12:59:07 2006 +0000 +++ b/floatobj.cpp Wed Mar 08 12:59:08 2006 +0000 @@ -83,8 +83,8 @@ void FloatObj::setDockPos() { - childPos=QPoint (bbox.bottomRight().x(), bbox.bottomRight().y() ); parPos=absPos; + childPos=absPos; } void FloatObj::reposition() diff -r 402f4cde3ea6 -r 22a885118d50 mapeditor.cpp --- a/mapeditor.cpp Wed Mar 08 12:59:07 2006 +0000 +++ b/mapeditor.cpp Wed Mar 08 12:59:08 2006 +0000 @@ -30,6 +30,7 @@ #include "editxlinkdialog.h" #include "exports.h" #include "extrainfodialog.h" +#include "file.h" #include "linkablemapobj.h" #include "mainwindow.h" #include "misc.h" @@ -2673,7 +2674,7 @@ { BranchObj *bo=((BranchObj*)selection); - QFileDialog *fd=new QFileDialog( this,QString ("vym - ")+tr("Load image")); + QFileDialog *fd=new QFileDialog( this); fd->setMode (QFileDialog::ExistingFiles); fd->addFilter (QString (tr("Images") + " (*.png *.bmp *.xbm *.jpg *.png *.xpm *.gif *.pnm)")); ImagePreview *p =new ImagePreview (fd); @@ -2705,6 +2706,8 @@ adjustCanvasSize(); canvas()->update(); } + delete (p); + delete (fd); } } diff -r 402f4cde3ea6 -r 22a885118d50 ornamentedobj.cpp --- a/ornamentedobj.cpp Wed Mar 08 12:59:07 2006 +0000 +++ b/ornamentedobj.cpp Wed Mar 08 12:59:08 2006 +0000 @@ -107,8 +107,8 @@ ); standardFlags->move (ox +x + heading->getWidth() + systemFlags->getBBox().width() , oy + y ); - ornamentsBBox.moveTopLeft ( QPoint (ox+x, oy+y)); - clickBox.moveTopLeft (QPoint (ox + x, oy + y)); + ornamentsBBox.moveTopLeft ( QPoint ((int)(ox+x),(int)(oy+y))); + clickBox.moveTopLeft (QPoint ((int)(ox + x), (int)(oy + y))); } @@ -218,6 +218,12 @@ return systemFlags->getFlagName(p); } +bool OrnamentedObj::isActiveFlag (const QString & fname) +{ + if (standardFlags->isActive (fname) ) return true; + return false; +} + void OrnamentedObj::updateNoteFlag() { if (selected) diff -r 402f4cde3ea6 -r 22a885118d50 ornamentedobj.h --- a/ornamentedobj.h Wed Mar 08 12:59:07 2006 +0000 +++ b/ornamentedobj.h Wed Mar 08 12:59:08 2006 +0000 @@ -35,6 +35,7 @@ virtual void toggleStandardFlag(QString, bool); virtual void activateStandardFlag(QString); virtual QString getSystemFlagName (const QPoint &p); + virtual bool isActiveFlag(const QString&); // check if flag is set virtual void updateNoteFlag(); protected: @@ -43,7 +44,6 @@ FlagRowObj *systemFlags; // System Flags FlagRowObj *standardFlags; // Standard Flags QRect ornamentsBBox; // bbox of flags and heading - }; #endif diff -r 402f4cde3ea6 -r 22a885118d50 version.h --- a/version.h Wed Mar 08 12:59:07 2006 +0000 +++ b/version.h Wed Mar 08 12:59:08 2006 +0000 @@ -3,6 +3,6 @@ #define __VYM "VYM" #define __VYM_VERSION "1.7.10" -#define __BUILD_DATE "March 7, 2006" +#define __BUILD_DATE "March 8, 2006" #endif