mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
if newly started plugin has not specified a location/size, use defaults
This commit is contained in:
parent
4f5ff657d4
commit
e26d2b596f
@ -24,7 +24,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: GUI.java,v 1.85 2008/10/03 13:40:56 fros4943 Exp $
|
||||
* $Id: GUI.java,v 1.86 2008/10/03 14:31:32 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja;
|
||||
@ -1612,12 +1612,14 @@ public class GUI extends Observable {
|
||||
}
|
||||
|
||||
// Set location if not already visible
|
||||
if (!plugin.isVisible()) {
|
||||
plugin.setLocation((nrFrames + 1) * FRAME_NEW_OFFSET, (nrFrames + 1)
|
||||
* FRAME_NEW_OFFSET);
|
||||
plugin.setVisible(true);
|
||||
if (plugin.getLocation().x <= 0 && plugin.getLocation().y <= 0) {
|
||||
plugin.setLocation(
|
||||
nrFrames * FRAME_NEW_OFFSET,
|
||||
nrFrames * FRAME_NEW_OFFSET);
|
||||
}
|
||||
|
||||
plugin.setVisible(true);
|
||||
|
||||
// Deselect all other plugins before selecting the new one
|
||||
try {
|
||||
for (JInternalFrame existingPlugin : myDesktopPane.getAllFrames()) {
|
||||
|
Loading…
Reference in New Issue
Block a user