diff --git a/hurricane/src/hurricane/Interval.cpp b/hurricane/src/hurricane/Interval.cpp index 8c718b19..a2e1c443 100644 --- a/hurricane/src/hurricane/Interval.cpp +++ b/hurricane/src/hurricane/Interval.cpp @@ -202,9 +202,14 @@ Interval& Interval::merge(const DbU::Unit& v) Interval& Interval::merge(const Interval& interval) // ************************************************ { - if (!interval.isEmpty()) { - _vMin = min(_vMin, interval._vMin); - _vMax = max(_vMax, interval._vMax); + if ( isEmpty() ) { + _vMin = interval._vMin; + _vMax = interval._vMax; + } else { + if (!interval.isEmpty()) { + _vMin = min(_vMin, interval._vMin); + _vMax = max(_vMax, interval._vMax); + } } return *this; } diff --git a/hurricane/src/hurricane/hurricane/CompositeLayers.h b/hurricane/src/hurricane/hurricane/CompositeLayers.h deleted file mode 100644 index cb3de3cf..00000000 --- a/hurricane/src/hurricane/hurricane/CompositeLayers.h +++ /dev/null @@ -1,76 +0,0 @@ -// **************************************************************************************************** -// File: ./hurricane/CompositeLayers.h -// Authors: R. Escassut -// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved -// -// This file is part of Hurricane. -// -// Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU -// Lesser General Public License as published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU -// General Public License for more details. -// -// You should have received a copy of the Lesser GNU General Public License along with Hurricane. If -// not, see . -// **************************************************************************************************** - -#ifndef HURRICANE_COMPOSITE_LAYERS -#define HURRICANE_COMPOSITE_LAYERS - -#include "hurricane/Collection.h" - -namespace Hurricane { - -class CompositeLayer; - - - -// **************************************************************************************************** -// CompositeLayers declaration -// **************************************************************************************************** - -typedef GenericCollection CompositeLayers; - - - -// **************************************************************************************************** -// CompositeLayerLocator declaration -// **************************************************************************************************** - -typedef GenericLocator CompositeLayerLocator; - - - -// **************************************************************************************************** -// CompositeLayerFilter declaration -// **************************************************************************************************** - -typedef GenericFilter CompositeLayerFilter; - - - -// **************************************************************************************************** -// for_each_composite_layer declaration -// **************************************************************************************************** - -#define for_each_composite_layer(compositeLayer, compositeLayers)\ -/****************************************************************/\ -{\ - CompositeLayerLocator _locator = compositeLayers.getLocator();\ - while (_locator.isValid()) {\ - CompositeLayer* compositeLayer = _locator.getElement();\ - _locator.progress(); - - - -} // End of Hurricane namespace. - -#endif // HURRICANE_COMPOSITE_LAYERS - - -// **************************************************************************************************** -// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved -// **************************************************************************************************** diff --git a/hurricane/src/hviewer/CellViewer.cpp b/hurricane/src/hviewer/CellViewer.cpp index 0382c860..dc9d4dbb 100644 --- a/hurricane/src/hviewer/CellViewer.cpp +++ b/hurricane/src/hviewer/CellViewer.cpp @@ -23,6 +23,7 @@ // x-----------------------------------------------------------------x +#include #include #include @@ -457,7 +458,14 @@ namespace Hurricane { QImage image ( _cellWidget->width(), _cellWidget->height(), QImage::Format_RGB32 ); _cellWidget->copyToImage ( &image, true ); //true for no scale (use for map congestion) - QString filePath = QFileDialog::getSaveFileName ( this, tr("Save image as ..."), "", tr("Image PNG ( *.png )") ); + char workingDirectory [1024]; + getcwd ( workingDirectory, 1024 ); + + QString filePath = QFileDialog::getSaveFileName ( this + , tr("Save Image as ...") + , workingDirectory + , tr("Image (*.png)") + ); image.save ( filePath, "png" ); } diff --git a/hurricane/src/hviewer/hurricane/viewer/CellViewer.h b/hurricane/src/hviewer/hurricane/viewer/CellViewer.h index 21266b41..b5459a8f 100644 --- a/hurricane/src/hviewer/hurricane/viewer/CellViewer.h +++ b/hurricane/src/hviewer/hurricane/viewer/CellViewer.h @@ -75,6 +75,7 @@ namespace Hurricane { Cell* getCell (); virtual Cell* getCellFromDb ( const char* name ); inline CellWidget* getCellWidget (); + inline ControllerWidget* getControllerWidget (); void select ( Occurrence& ); void unselect ( Occurrence& ); void unselectAll (); @@ -141,8 +142,9 @@ namespace Hurricane { inline void CellViewer::setEnableRedrawInterrupt ( bool state ) { _cellWidget->setEnableRedrawInterrupt(state); } - inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; } - inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; } + inline CellWidget* CellViewer::getCellWidget () { return _cellWidget; } + inline ControllerWidget* CellViewer::getControllerWidget () { return _controller; } + inline void CellViewer::setApplicationName ( const QString& name ) { _applicationName = name; } } // End of Hurricane namespace.